/* Copyright (c) 2004-2024 Peigen.info. All rights reserved. */
package info.peigen.hotpot.component.doc.core.domain;

import com.google.common.collect.Lists;
import info.peigen.hotpot.common.core.domain.DomainObject;
import info.peigen.hotpot.component.doc.core.enums.HotpotDocApiType;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.*;
import lombok.experimental.Accessors;
import lombok.experimental.FieldDefaults;
import lombok.experimental.SuperBuilder;

import java.util.List;

/**
 * <b>(HotpotApi)</b>
 * 接口文档领域对象
 *
 * @author Peigen
 * @version 1.0.0
 * @since 2023/12/8
 */
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
@Data
@NoArgsConstructor
@AllArgsConstructor
@FieldDefaults(level = AccessLevel.PRIVATE)
@Accessors(chain = true)
public class HotpotApi extends DomainObject {
    @NotEmpty
    String                   name;
    @NotEmpty
    String                   code;
    @NotEmpty
    String                   description;
    @NotNull
    HotpotDocApiType         type;
    @NotEmpty
    @Builder.Default
    List<HotpotDocAttribute> inAttributes  = Lists.newArrayList();
    @NotEmpty
    @Builder.Default
    List<HotpotDocAttribute> outAttributes = Lists.newArrayList();
}
